package com.xzm.project.ui.activity;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.LinearLayout;

import com.xzm.project.R;

/**
 * https://blog.csdn.net/guolin_blog/article/details/9097463
 */
public class MotionEventActivity extends BaseActivity {
    private Button btnMotionEvent;
    private LinearLayout llRootLayout;


    @Override
    protected int getLayoutID() {
        return R.layout.activity_motion_event;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        btnMotionEvent = findViewById(R.id.btnMotionEvent);
        llRootLayout = findViewById(R.id.llRootLayout);
    }

    @SuppressLint("ClickableViewAccessibility")
    @Override
    protected void initListener() {
//        llRootLayout.requestDisallowInterceptTouchEvent(false);
//        llRootLayout.getParent().requestDisallowInterceptTouchEvent();
//        btnMotionEvent.setOnClickListener(v -> {
//            Log.d("TAG", "onClick execute");
//        });
//        btnMotionEvent.setOnTouchListener((v, event) -> {
//            Log.d("TAG", "onTouch execute, action " + event.getAction());
//            return false;
//        });
//        btnMotionEvent.dispatchTouchEvent()
    }

}
